package com.hg.chapter861.enetity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Collection;
import java.util.LinkedHashSet;

@Document
//模型与文档
@AllArgsConstructor
@Getter
@Setter
public class Person {
    @Id
    private String id;

    private String name;

    private Integer age;

    private Collection<Location> locations=new LinkedHashSet<>();

}
